#ifndef EXCHANGEINTEROP_H
#define EXCHANGEINTEROP_H

#pragma once

#include "bridge/ExchangeBase.h"
#include "common/constant.h"

#ifdef INTEROP_ENABLE
#include "InterOpObject.h"
#endif

AMCAX_EXCHANGE_NAMESPACE_BEGIN

class ExchangeDocumentInstance;

namespace InterOp {
class InterOpDocumentInstance;

using ExchangeObjectPtr = std::shared_ptr<ExchangeObject>;

class ExchangeInterOp : public ExchangeBase
{
public:
    ExchangeInterOp(std::string file_path) ;
    static bool CheckLicense() ;
private:
    void ReadFromFilePath() override;
    void ReadFromFileStream() override;
    void Write(const std::vector<ExchangeObjectPtr> &exchange_shapes, const std::shared_ptr<ExchangeDocumentInstance> &exchangeDocumentInstance) override;  
#ifdef INTEROP_ENABLE
    std::shared_ptr<ExchangeObject> RecursionConvert(const std::shared_ptr<InterOpObject> &interOpObject);
    std::shared_ptr<ExchangeDocumentInstance> ConvertDocumentInstance(const std::shared_ptr<InterOpDocumentInstance> &interOpDocInst);
#endif
    
};

AMCAX_EXCHANGE_NAMESPACE_END

}

#endif